import { IsBoolean, IsOptional } from 'class-validator';
import { DeleteDto } from './delete.dto';
import { Transform } from 'class-transformer';
import { DtoValidation } from '../decorators/dto-validation.decorator';

@DtoValidation({ type: 'body' })
export class TrashDeleteDto extends DeleteDto {
  @IsBoolean()
  @Transform(({ value }) => Boolean(value))
  @IsOptional()
  trash?: boolean;
}

export class Trash {
  @IsBoolean()
  @Transform(({ value }) => Boolean(value))
  @IsOptional()
  withTrash?: boolean;

  @IsBoolean()
  @Transform(({ value }) => Boolean(value))
  @IsOptional()
  onlyTrash?: boolean;
}
